<?php namespace Phpcmf\Controllers\Member;

/**
 * 二次开发时可以修改本文件，不影响升级覆盖
 */

class Guanzhu extends \Phpcmf\Home\Mform
{
    public function index() {

        // 获取父级内容
        $this->cid = $this->content_model->get_zone_id($this->uid);
        if (!$this->cid) {
            $this->_msg(0, dr_lang('你没有开通空间'));
        }

        // 初始化数据表
        $this->_init([
            'field' => $this->form['field'],
            'table' => dr_module_table_prefix(APP_DIR).'_form_guanzhu',
            'date_field' => 'inputtime',
            'show_field' => 'title',
            'order_by' => 'inputtime desc',
            'where_list' => 'cid='.$this->cid,
        ]);

        $this->_List(['cid' =>  $this->cid]);

        \Phpcmf\Service::V()->display('guanzhu.html');
    }

}
